\section{Syntax of predication logic}

\begin{enumerate}[(a)]
	\item 
	
	\begin{enumerate}[i)]
	\item $(\forall x P(x) \rightarrow \forall x Q(x)) \vee \forall x (P(x) \rightarrow Q(y))$ 
	
		\begin{figure}[!ht]
				\qtreepadding=7pt
					\Tree [.$\vee$ 
									[.$\rightarrow$ 
											[.$\forall x$
												[.P
													{x \\ \mbox{\begin{sideways}(bounded by $\forall$ above P)\end{sideways}}}
												]
											]
											[.$\forall x$
												[.Q
													{x\\ \mbox{\begin{sideways} (bounded by $\forall$ above Q)\end{sideways}}}
												]
											]	
										]
									[.$\forall x$
										[.$\rightarrow$
										[.P
											{x\\ \mbox{\begin{sideways} (bounded by $\forall$ above $\rightarrow$)\end{sideways}}}
										]
										[.Q
											{y\\ \mbox{\begin{sideways} (free)\end{sideways}}}
										]
										]
									]
								]
				\end{figure}
		
	
	
	\item $ \forall x (P(x,y) \rightarrow Q(x)) \rightarrow \exists y R(a,f(x,y))$
				\begin{figure}[!ht]
				\qtreepadding=7pt
					\Tree [.$\rightarrow$ 
									[.$\forall x$ 
										[.$\rightarrow$		
											[.P
												{x \\ \mbox{\begin{sideways} (bounded by $\forall$ above $\rightarrow$)\end{sideways}}}
												{y \\ \mbox{\begin{sideways} (free)\end{sideways}}}
											]
											[.Q
												{x \\ \mbox{\begin{sideways} (bounded by $\forall$ above $\rightarrow$)\end{sideways}}}
											]
										]
									]
									[.$\exists y$ 
										[.R
											{a \\ \mbox{\begin{sideways} (free)\end{sideways}}}
											[.f
												{x \\ \mbox{\begin{sideways} (free)\end{sideways}}}
												{y \\ \mbox{\begin{sideways} (bounded by $\exists$ above R)\end{sideways}}}
											]
										]
									]
								]
				\end{figure}
	
	
	\clearpage
	\item $ \neg(\forall x \forall y(P(x,a) \rightarrow \exists x R(x,y,z)) \wedge S(x,y)) $
				\begin{figure}[!ht]
				\qtreepadding=7pt
					\Tree [.$\neg$
									[.$\wedge$ 
										[.$\forall x$ 
											[.$\forall y$ 
												[.$\rightarrow$		
													[.P
														{x \\ \mbox{\begin{sideways} (bounded by $\forall$ below $\neg$)\end{sideways}}}
														{a \\ \mbox{\begin{sideways} (free)\end{sideways}}}
													]
													[.$\exists x$
														[.R
														{x \\ \mbox{\begin{sideways} (bounded by $\exists$ above R)\end{sideways}}}
														{y \\ \mbox{\begin{sideways} (bounded by $\forall$ above $\rightarrow$)\end{sideways}}}
														{z \\ \mbox{\begin{sideways} (free)\end{sideways}}}
														]
													]
												]
											]
										]
									[.S 
										{x \\ \mbox{\begin{sideways} (free)\end{sideways}}}
										{y \\ \mbox{\begin{sideways} (free)\end{sideways}}}
									]
									]
									]
				\end{figure}
	
	
	\item $ \forall x(J(x) \rightarrow \exists y (M(y)\wedge \exists y H(x,y))) $
	
		\begin{figure}[!ht]
				\qtreepadding=7pt
					\Tree [.$\forall x$ 
									[.$\rightarrow$ 
											[.J
												{x \\ \mbox{\begin{sideways} (bounded by $\forall$)\end{sideways}}}
												]
											[.$\exists y$
											 [.$\wedge$
											 	[.M
											 		{y \\ \mbox{\begin{sideways} (bounded by $\exists$ above $\wedge$)\end{sideways}}}
											 	]
											 	[.$\exists y$
											 		[.H
											 			{x \\ \mbox{\begin{sideways} (bounded by $\forall$)\end{sideways}}}
											 			{y \\ \mbox{\begin{sideways} (bounded by $\exists$ above H)\end{sideways}}}
											 		]
											 	]
											 ]
											] 
									]
								]
				\end{figure}
	
	\end{enumerate}
	\item 
		
			\begin{itemize}
				\item $(\emph{ \forall x P(x)} \rightarrow \emph{\forall x Q(x)}) \vee \emph{\forall x (P(x) \rightarrow Q(y))}$ 
				\item $\emph{\forall x (P(x,y) \rightarrow Q(x))} \rightarrow \emph{\exists y R(a,f(x,y)})$
				\item $\neg(\emph{\forall x \emph{\forall y(P(x,a) \rightarrow \emph{\exists x R(x,y,z)})}} \wedge S(x,y)) $
				\item $\emph{\forall x(J(x) \rightarrow \emph{\exists y (M(y)\wedge \emph{\exists y H(x,y)})})} $
			\end{itemize}
			
			
			
			
			
			
			
\end{enumerate}

